<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../template/userTemplate.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui">

    <ui:define name="title">

    </ui:define>

    <ui:define name="head">
    </ui:define>

    <ui:define name="content1">
        <div class="page-header">
            <h3>Upcoming Events</h3>


        </div>

        <div class="col-6 col-sm-6 col-lg-6">
            <h:form id="f1">
                <p:dataTable styleClass="main-table" value="#{userEventManager.allEvent}" var="e" style="width: 100%;">
                   
                    <p:column >
                        <f:facet name="header">
                            <h:commandLink value="Title" />
                        </f:facet>
                        #{e.title}
                    </p:column>
                    <p:column >
                        <f:facet name="header">
                            <h:commandLink value="Start time" />
                        </f:facet>
                        <h:outputText value="#{e.startTime}">
                            <f:convertDateTime type="date" pattern="dd-MM-yyyy" timeZone="GMT+7"/>
                        </h:outputText>
                    </p:column>


                    <p:column>
                        <f:facet name="header">
                            <h:commandLink value="End time" />
                        </f:facet>
                        <h:outputText value="#{e.endTime}">
                            <f:convertDateTime type="date" pattern="dd-MM-yyyy" timeZone="GMT+7"/>
                        </h:outputText>
                    </p:column>

                    
                </p:dataTable>
            </h:form>


        </div>

    </ui:define>

</ui:composition>
